package data;

public enum ClassDays {
	MONDAY("Monday"), TUESDAY("Tuesday"), WEDNESDAY("Wednesday"), 
    THURSDAY("Thursday"), FRIDAY("Friday"), // Fun (Fun)*
    SATURDAY("Saturday"), SUNDAY("Sunday");
    
    ClassDays(String theName){
		myName = theName;
	}
	
	@Override 
	public String toString() { return myName; }
	
	private String myName;
	
	/* names and findDay added by Gavin */
	public static ClassDays findDay(char theChar){
		ClassDays returnDay = null;
		
		switch (theChar) {
		case 'M':
			returnDay = ClassDays.MONDAY;
			break;
		case 'T':
			returnDay = ClassDays.TUESDAY;
			break;
		case 'R':
			returnDay = ClassDays.THURSDAY;
		case 'W':
			returnDay = ClassDays.WEDNESDAY;
			break;
		case 'F':
			returnDay = ClassDays.FRIDAY;
			break;
		case 'S':
			returnDay = ClassDays.SATURDAY;
			break;
		case 'U':
			returnDay = ClassDays.SUNDAY;
		default:
			/* this should never happen*/
			break;
		}
		return returnDay;
	}
	}
	